<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        .current {
            color: pink
        }
    </style>
</head>

<body>
    <div id="app">

        <moust :list='list'>
            <template slot-scope="slotProps">
                <p v-if="slotProps.info.id == 2" class="current">{{slotProps.info.name}}</p>
                <span v-else>{{slotProps.info.name}}</span>
            </template>

        </moust>
    </div>
    <script src="../vue.js"></script>
    <script>
        Vue.component('moust', {
            props: ['list'],
            data() {
                return {

                }
            },
            template: `
                <ul>
                    <li :key="item.id" v-for="item in list">
                        <slot :info="item">{{item.name}}</slot>
                        </li>
                    </ul>
            `
        })
        const vm = new Vue({
            el: "#app",
            data: {
                list: [{
                    id: 1,
                    name: "orange",

                }, {
                    id: 2,
                    name: "apple"
                }, {
                    id: 3,
                    name: "pink"
                }]
            }
        })
    </script>
</body>

</html>